;;; init-editor.el --- my emacs editor initialize file
;; Author: mark Liu <liumiaogemini@gmail.com>.
;; LICENSE: See the root folder.

;;; Commentary:
;; Intilize some package which help me edit files.

;;; Code:

;;; Init org-mode
;; Activation
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(add-to-list 'load-path "~/.emacs.d/elpa/org-bullets")

(add-hook 'org-mode-hook 'turn-on-font-lock)

;; The orgstruct minor mode-name
(add-hook 'message-mode-hook 'turn-on-orgstruct)
(add-hook 'message-mode-hook 'turn-on-orgstruct++)

;; Src fontify
(setq org-src-fontify-natively t)

(add-hook 'org-mode-hook (lambda () (setq truncate-lines nil)))
(add-hook 'org-mode-hook (lambda () (org-autolist-mode)))

(require 'org-ac)
(org-ac/config-default)

;; org-bullets
;;(require 'org-bullets)
;;(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))

;;; YASnipper
(add-to-list 'load-path "~/.emacs.d/elpa/yasnippet")

(require 'yasnippet)
(yas-reload-all)
(add-hook 'prog-mode-hook #'yas-minor-mode)

;;; Init auto-complete
(add-to-list 'load-path "~/.emacs.d/elpa/auto-complete-1701/")
(add-to-list 'load-path "~/.emacs.d/elpa/auto-complete-1701/dict/")
(add-to-list 'load-path "~/.emacs.d/elpa/auto-complete-pcmp")

;; Auto complete
(require 'pos-tip)
(require 'auto-complete-config)
(auto-complete-mode t)
(ac-config-default)

;; Init Cedet
;;(semantic-mode t)
;;(require 'semantic-tag-folding nil 'noerror)
;;(global-semantic-tag-folding-mode)

;; Init ecb

;; flycheck
(add-hook 'after-init-hook #'global-flycheck-mode)

;;Init evil
(add-to-list 'load-path "~/.emacs.d/elpa/evil")
(require 'evil)
;;(evil-mode 1)
;;(setq evil-shift-width 8)

;;; Init markdown
(add-to-list 'load-path "~/.emacs.d/elpa/markdown-mode")
(require 'markdown-mode)

;;; Init swiper
(ivy-mode 1)
(setq ivy-use-virtual-buffers t)

(provide 'init-editor)
;;; init-editor.el ends here
